package uk.ac.glasgow.demosocs.store;

import java.util.HashSet;

public interface ElectorateStore {

	/**
	 * Adds a new electorate to storage
	 * @param electorateID the ID of the particular electorate
	 * @param users a hash set of strings identifying the users
	 */
	public abstract void addElectorate(String electorateID,
			HashSet<String> users);

	/**
	 * Adds a new electorate to the storage
	 * @param electorateID the id of the particualr electorate
	 */
	public abstract void addElectorate(String electorateID);

	/**
	 * Adds a user to an electorate grouping
	 * @param electorateID the electorate ID
	 * @param userID the user's ID
	 */
	public abstract void addUserToElectorate(String electorateID, String userID);

	/**
	 * Removes a user from an electorate grouping
	 * @param electorateID the electorate ID
	 * @param userID the user's ID
	 */
	public abstract void removeUserFromElectorate(String electorateID,
			String userID);

	/**
	 * Gets if a particular user is eligible to vote for a particular electorate
	 * @param electorateID the electorate ID
	 * @param userID the user's ID
	 * @return true/false as to wether the user can vote in that electorate grouping
	 */
	public abstract boolean isEligible(String electorateID, String userID);

	public abstract boolean isValidElectorate(String electorateName);

}